<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@page isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>永和大王门店管理系统</title>
</head>
<body style="padding: 20px;">

<div align="center">
    <h1>永和大王门店管理系统-订单列表</h1>

</div>

<table border="1" cellspacing="0" align="center">
    <tr align="center">
        <th>序号</th>
        <th>订单号</th>
        <th>类型</th>
        <th>收银员</th>
        <th>下单时间</th>
        <th>结账时间</th>
        <th>支付类型</th>
        <th>价格</th>
        <th>操作</th>
        <th><a href="toAdd">新增</a></th>
    </tr>
    <c:forEach items="${orderList}" var="o" varStatus="i">
        <tr>
            <td align="center">${i.index+1}</td>
            <td align="center">${o.orderNo}</td>
            <td align="center">${o.orderType}</td>
            <td align="center">${o.cashier}</td>
            <td align="center"><fmt:formatDate value="${o.createTime}"
                                               pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td align="center"><fmt:formatDate value="${o.endTime}"
                                               pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td align="center">${o.paymentType}</td>
            <td align="right">${o.price}</td>
            <td>
                <a href="/toUpdate?did=${o.doorId}&oid=${o.orderId}">修改</a>
                <a href="deleteOrderById?id=${o.orderId}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>


<br>

<div style="color:#0000FF">

    <div  style=";text-align:center;">
        <p>
            <a href="findOrderLimit?currentPage=${currentPage-1} ">上一页</a>
            &nbsp;&nbsp;
            <a href="findOrderLimit?currentPage=${currentPage+1} ">下一页</a>
        </p>
        <p>共${pages}页&nbsp;&nbsp;共${count}有条记录&nbsp;&nbsp;当前是第${currentPage}页</p>
    </div>
</div>



</body>
</html>
